package com.zhang.service.impl;

import com.zhang.mapper.IUserMapper;
import com.zhang.pojo.UserBean;
import com.zhang.service.IUserService;
import org.apache.catalina.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
@Transactional
public class UserServiceImpl implements IUserService {

    @Autowired
    private IUserMapper userMapper;

    @Override
    public UserBean findByName(String name) {
        return userMapper.findByName(name);
    }

    @Override
    public UserBean findByNameAndPwd(String username, String pwd) {
        return userMapper.findByNameAndPwd(username, pwd);
    }

    @Override
    public void addUser(UserBean userBean) {
        userMapper.addUser(userBean);
    }
}
